package com.cskaoyan.service;

import com.cskaoyan.bean.GenericData;
import com.cskaoyan.bean.Systempermissions;
import com.cskaoyan.bean.param.BaseParam;
import com.cskaoyan.bean.po.MarketRole;
import com.cskaoyan.bean.role.SimpleRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleService {

    GenericData<MarketRole> query(BaseParam param, String name);

    Integer create(@Param("name") String name, @Param("desc") String desc);

    MarketRole queryById(Integer id);

    Integer update(@Param("marketRole") MarketRole marketRole);

    Integer deleted(@Param("marketRole") MarketRole marketRole);

    GenericData<SimpleRole> options();

    List<Systempermissions> querySystempermissions();

    List<String> queryRolePermissions(Integer roleId);

    Integer deletePermissionsByRoleId(Integer roleId);

    Integer insertPermissionsByRoleId(Integer roleId, String permission);
}
